<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UI plugins: GNOME Data Access 5 manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNOME Data Access 5 manual">
<link rel="up" href="ch22.html" title="User interface API reference">
<link rel="prev" href="GdauiRtEditor.html" title="GdauiRtEditor">
<link rel="next" href="GdauiDataEntry.html" title="GdauiDataEntry">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libgda-5.0-UI-plugins.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch22.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GdauiRtEditor.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GdauiDataEntry.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgda-5.0-UI-plugins"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgda-5.0-UI-plugins.top_of_page"></a>UI plugins</span></h2>
<p>UI plugins — Plugin to customize dana entry widgets and call renderers in tree views</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgda-5.0-UI-plugins.stability-level"></a><h2>Stability Level</h2>
<a href="http://foldoc.org/Stable"><span class="acronym">Stable</span></a>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="libgda-5.0-UI-plugins.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GdauiDataEntry.html" title="GdauiDataEntry"><span class="returnvalue">GdauiDataEntry</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libgda-5.0-UI-plugins.html#GdauiEntryCreateFunc" title="GdauiEntryCreateFunc ()">*GdauiEntryCreateFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/gtk3/GtkCellRenderer.html#GtkCellRenderer-struct"><span class="returnvalue">GtkCellRenderer</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libgda-5.0-UI-plugins.html#GdauiCellCreateFunc" title="GdauiCellCreateFunc ()">*GdauiCellCreateFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgda-5.0-UI-plugins.html#gdaui-plugin-declare" title="gdaui_plugin_declare ()">gdaui_plugin_declare</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgda-5.0-UI-plugins.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="libgda-5.0-UI-plugins.html#GdauiPlugin" title="GdauiPlugin">GdauiPlugin</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgda-5.0-UI-plugins.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libgda/thread-wrapper/gda-thread-wrapper.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="libgda-5.0-UI-plugins.description"></a><h2>Description</h2>
<p>This section describes the functions used to declare UI plugins: data entry and cell renderers.</p>
</div>
<div class="refsect1">
<a name="libgda-5.0-UI-plugins.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GdauiEntryCreateFunc"></a><h3>GdauiEntryCreateFunc ()</h3>
<pre class="programlisting"><a class="link" href="GdauiDataEntry.html" title="GdauiDataEntry"><span class="returnvalue">GdauiDataEntry</span></a> *
<span class="c_punctuation">(</span>*GdauiEntryCreateFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="libgda-5.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> *handler</code></em>,
                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *options</code></em>);</pre>
<p>Defines a function which creates a <a class="link" href="GdauiDataEntry.html" title="GdauiDataEntry"><span class="type">GdauiDataEntry</span></a> widget</p>
<div class="refsect3">
<a name="GdauiEntryCreateFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>options</p></td>
<td class="parameter_description"><p>options, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GdauiEntryCreateFunc.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="GdauiDataEntry.html" title="GdauiDataEntry"><span class="type">GdauiDataEntry</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GdauiCellCreateFunc"></a><h3>GdauiCellCreateFunc ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gtk3/GtkCellRenderer.html#GtkCellRenderer-struct"><span class="returnvalue">GtkCellRenderer</span></a> *
<span class="c_punctuation">(</span>*GdauiCellCreateFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="libgda-5.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a> *handler</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                        <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *options</code></em>);</pre>
<p>Defines a function which creates a <a href="/usr/share/gtk-doc/html/gtk3/GtkCellRenderer.html#GtkCellRenderer-struct"><span class="type">GtkCellRenderer</span></a> object</p>
<div class="refsect3">
<a name="GdauiCellCreateFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgda-5.0-Default-Data-handlers.html#GdaDataHandler"><span class="type">GdaDataHandler</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>options</p></td>
<td class="parameter_description"><p>options, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GdauiCellCreateFunc.returns"></a><h4>Returns</h4>
<p>a new <a href="/usr/share/gtk-doc/html/gtk3/GtkCellRenderer.html#GtkCellRenderer-struct"><span class="type">GtkCellRenderer</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdaui-plugin-declare"></a><h3>gdaui_plugin_declare ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdaui_plugin_declare (<em class="parameter"><code>const <a class="link" href="libgda-5.0-UI-plugins.html#GdauiPlugin" title="GdauiPlugin"><span class="type">GdauiPlugin</span></a> *plugin</code></em>);</pre>
<p>Adds a new plugin which will be used by the forms and grids. The new plugin, as
described by <em class="parameter"><code>plugin</code></em>
 can declare a custom widget to be used for forms, grids, or both.</p>
<p>If a plugin is already declared with the same name as the requested name, then
a warning is issued and the operation fails.</p>
<div class="refsect3">
<a name="gdaui-plugin-declare.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>a pointer to a structure filled to describe the new plugin. All the contained information is copied.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="libgda-5.0-UI-plugins.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdauiPlugin"></a><h3>GdauiPlugin</h3>
<pre class="programlisting">typedef struct {
	gchar                  *plugin_name;
	gchar                  *plugin_descr;
	gchar                  *plugin_file;

	guint                   nb_g_types; /* 0 if all types are accepted */
        GType                  *valid_g_types; /* not NULL if @nb_g_types is not 0 */

	gchar                  *options_xml_spec; /* NULL if no option possible */

	GdauiEntryCreateFunc    entry_create_func;
	GdauiCellCreateFunc     cell_create_func;
} GdauiPlugin;
</pre>
<p>Structure representing a plugin.</p>
<p>Note: <em class="parameter"><code>entry_create_func</code></em>
 and <em class="parameter"><code>cell_create_func</code></em>
 can't be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> at the same time</p>
<div class="refsect3">
<a name="GdauiPlugin.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GdauiPlugin.plugin-name"></a>plugin_name</code></em>;</p></td>
<td class="struct_member_description"><p>the name of the plugin</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GdauiPlugin.plugin-descr"></a>plugin_descr</code></em>;</p></td>
<td class="struct_member_description"><p>a description for the plugin, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="struct_member_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GdauiPlugin.plugin-file"></a>plugin_file</code></em>;</p></td>
<td class="struct_member_description"><p>the shared object implementing the plugin, can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for internal plugins. </p></td>
<td class="struct_member_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GdauiPlugin.nb-g-types"></a>nb_g_types</code></em>;</p></td>
<td class="struct_member_description"><p>number of types the plugin can handle, or <code class="literal">0</code> for any type</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> *<em class="structfield"><code><a name="GdauiPlugin.valid-g-types"></a>valid_g_types</code></em>;</p></td>
<td class="struct_member_description"><p>an array of <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>, containing the accepted types, its size is <em class="parameter"><code>nb_g_types</code></em>
, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>nb_g_types</code></em>
is <code class="literal">0</code>. </p></td>
<td class="struct_member_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GdauiPlugin.options-xml-spec"></a>options_xml_spec</code></em>;</p></td>
<td class="struct_member_description"><p>a string describing the plugin's options, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="struct_member_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="libgda-5.0-UI-plugins.html#GdauiEntryCreateFunc" title="GdauiEntryCreateFunc ()"><span class="type">GdauiEntryCreateFunc</span></a> <em class="structfield"><code><a name="GdauiPlugin.entry-create-func"></a>entry_create_func</code></em>;</p></td>
<td class="struct_member_description"><p>the function called to create a <a class="link" href="GdauiDataEntry.html" title="GdauiDataEntry"><span class="type">GdauiDataEntry</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="struct_member_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="libgda-5.0-UI-plugins.html#GdauiCellCreateFunc" title="GdauiCellCreateFunc ()"><span class="type">GdauiCellCreateFunc</span></a> <em class="structfield"><code><a name="GdauiPlugin.cell-create-func"></a>cell_create_func</code></em>;</p></td>
<td class="struct_member_description"><p>the function called to create a <a href="/usr/share/gtk-doc/html/gtk3/GtkCellRenderer.html#GtkCellRenderer-struct"><span class="type">GtkCellRenderer</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="struct_member_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>